package com.eliza.base.views.learn.layouts

import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.navigation.NavController
import com.eliza.base.views.learn.layouts.basic.LayoutBasicX
import com.eliza.base.views.learn.layouts.basic.SupportX
import com.eliza.base.views.learn.layouts.material.LayoutMaterialX


object LayoutX {
    @Composable
    fun Show(navController: NavController) {
        Column {
            var count by remember {
                mutableIntStateOf(0)
            }
            Button(onClick = { count = (count + 1) % 4 }) {
                Text(text = "點擊切換")
            }
            when (count) {
                1 -> LayoutMaterialX.Show(navController)
                2 -> LayoutBasicX.Show(navController)
                3 -> SupportX.Show(navController)
                else -> {}
            }
        }
    }
}

